package com.hzhjhh.means;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.hzhjhh.DBAccess;

public class Dialog_enroll_SQL {
	public static final String SQL_SELECT = "select * from UserManage where CardId=?";

	public boolean IsEmployeeExits(DialogEnrollMySQL Dialog_enroll_MySQL) {
		DBAccess helper = new DBAccess();
		Connection conn = helper.getConnection();
		PreparedStatement ps = null;
		ResultSet rs = null;
		String sql = "select * from UserManage where CardId=?";
		try {
			ps = conn.prepareStatement(sql);
			ps.setInt(1, Dialog_enroll_MySQL.getCardId());
			rs = ps.executeQuery();
			if (rs.next()) {
				return true;
			}
			return false;

		} catch (SQLException e) {
			e.printStackTrace();
		}
		return false;
	}

}
